﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ThucTapOnsoft.Models;

namespace ThucTapOnsoft.Controllers
{
    public class BrandsController : Controller
    {
        //
        // GET: /Brands/

        public ActionResult Index()
        {
            nuochoamypham_dbEntities3 db = new nuochoamypham_dbEntities3();
            string chuoi = "";
            var brand = (from br in db.Brands orderby br.Id descending select br).Take(10).ToList();
            for (int i = 0; i < brand.Count; i++)
            {
                chuoi +="<img src=\""+brand[i].Logo+"\"/>";
            }
                ViewBag.raw = chuoi;
                return View();
        }

    }
}
